some prepare fixes