Fixed oversampling bug