fixed docs. Fixed uninitilaized variable