[TASK] Fix for posible javascript error

obvious i think