fixed bug in compile