Fixed some bugs - passing it back to Spencer