Fixed Gabriel's bug