Fix bug where thesis could cost 0 emeralds