removed typecast warnings and fixing problems with symbol size lookup