fixing prepare call