error on mobile devices due to wrong var assignment