Fix js error on empty callback