Fix #813 and #814

So sorry )