Fixes for Atmosphere/atmosphere-javascript#1127