Corrected bug in binding variables