fix SE bug that throws an exception

needed to add some tests to check if two vars were undefined