Fixes issue #635, removes warnings and notices