fixed bug with construct