Codereview fixes for b30f564