Fix beat function so precisely control beats