Changed handle creation method to something more reliable