Created size function to fix offscreen issue.