Fixed a bug that caused it not to work if there was no caption