Fixed bug with delegate deglaration

- Fixed issue #4