Fixed the crash bug and scaling on different aspect ratio devices