fix bug to create location