fixed bug in bind