Resolved a compiler issue with CGFloat vs Double