make dynamic lights and flickering dynamic lights work again and fix a silly bug in is_array