Fix some bugs with new features