little bugfix and clean up format