fixes loop conditional for building schedule