Fix a bug, figure out the best way to do this