added in check to prevent error when flinging at the edges (android)