fixed bug when using variable/function call to specify position