Replaced old style casts (issue #28)