fixed bug in image acquisition