Fixed issue with minimising resetting the position.