fix for entity on edge collision