Fix BUG #1246