Simplification + bug fix