Fix cactus not writing correctly