Fixed type check of 'set' method
minor changes