added tests for recipe reference and fixed bug in validation