Fixed Jms bugs, reformat