minor cleanups (indentation, formatting and ordering)

Come on @sipa merged a similar fix for a missing LOCK indentation yesterday or 2 days ago -_-.