Fix meta box logic