Fixed issues with rasql functiontions