Fixed an error due to divide by zero if no frames for a certain colour