This fixes #94, fixes #92 and prevents a crash in case of Internal Server Error