fixed indentation, small bugfixes