Bug fix
Bug fix to handle unusual cases