fixed the default direction to null