fixed predef's and added type checking support for arrays