Frame logic fix

Fixed the centre point calculation