cleaned up a bug