Cleaned up the code to ensure compat with sym 2.4+