fixed some markup crashes