Fixed specs failing
Added tests for dirty check