fixed undefined location