fixed a warning and an error