Got it. Thanks Connor. Could you please look through the code abd tell what is causing the crash? Because crash is very weird, shows some Invalid Array Handle and SQL errors.
EDIT : removed velocity and for cycle at all (no need in them) still crashing , please help!