Write statement fix