fix trailing , bug and whitespace