changed the free "if" statement
fixed an atom offset error and list length error