Updated code, when error occurred it seemed to error out. Fixed!