draft of fixes for extend/gun#15 extend/gun#16