fixed some dynamic things (cast would not be possible otherwise)