Fix cast to int from pointer (duh!)