Fix logic errors
bump version