fixed cutoff bug