Added more fixes for some typical situations