fix matched declarations of extern variables
fix added required typecast for heap start address