fixing some warning/errors