Rewrite to fix issues, still exist