Fix negative schedule length