Fixed the 'take-shot' function