current_frame was returning an int when it needed to return a double. Fixed.