Moved stdscale up to fix scope