some tweaks suggested by compiler