Fix some strange behavior