Fixed scope bug; Code Style