fixing issues with inlines and running pagedown multiple times