Implemented nullren's fix by creating a comparsion test for handles