Bug fixes related to adding clue codes