Changed the behaviour of a warning and fixed a bug