Fixed NullPointerException while removing items