Fixed issues with variable