small bugfix with temporary array size