fixed NA handling in execute_prepared