Solves 'invalid left-hand side in assignment'