Fixed bug, formatting changes