fixed crash finally
fully implemented confusing mode