variable assignment fixes