fixed a problem with type calculation of statically calculated values