Fixed 'control may reach end of non void function' warning