fixed 2 bugs, indented