Fixes from Ravie/aowow