various improvements
got rid of some warning