Problem: Compiler complains about incompatible types. Solution: Remove type casts. (hint by Danek Duvall)