Fix bugs and normalize behavior