Try to fix bug with variable assigning