- fixed the theorem reference issue and seems to have fixed the bugs with preview as well