Fixes for studydate getStudyDate() function being called twice