Fixed warning messages found using eclipse