SWF-2832 : Fix some bugs