fix gravity effect happening when changing state on mobile