Quick hack, TODO remove it and fix it properly