fix variable declaration position.