Fix varible assignment