On released event bug

Thank you for this fix! Hopefully that works for mobile too!