fix messengercompose issues and make jslint happy