Fix some issues related to #43