Fixed invocation of lat and long as functions