prevent empty frames who creates division by zero