Fix for unDrag event undefined error - Issue #479

Just added a small fix to catch this error.