fixed null pointer exception in event of no directory for study.