some fixes & autoformat