Fix bugs
Restore behavior