Changed the backend api somewhat. Added bpm==0 check.