Warnings and errors fix