Solving the mystery of the X-ray periodicity in the Seyfert galaxy NGC6814